// API 响应接口
export interface ApiResponse<T = any> {
  success: boolean;
  data: T;
  message?: string;
  meta?: {
    total?: number;
    page?: number;
    limit?: number;
  };
}

// 分页响应接口
export interface PaginatedResponse<T> {
  data: T[];
  meta: {
    total: number;
    page: number;
    limit: number;
  };
}

// 工作区相关接口
export interface Workspace {
  id: string;
  name: string;
  description?: string;
  createdAt: string;
  updatedAt: string;
  createdBy: string;
  isDeleted: boolean;
}

// 工作区成员接口
export interface WorkspaceMember {
  id: string;
  workspaceId: string;
  userId: string;
  roleId: string;
  createdAt: string;
  updatedAt: string;
  user?: {
    id: string;
    username: string;
    email: string;
    avatar?: string;
  };
  role?: {
    id: string;
    name: string;
    code: string;
  };
}

// 项目相关接口
export interface Project {
  id: string;
  name: string;
  description?: string;
  workspaceId: string;
  status: string;
  priority: string;
  startDate?: string;
  endDate?: string;
  createdAt: string;
  updatedAt: string;
  createdBy: string;
}

// 任务相关接口
export interface Task {
  id: string;
  title: string;
  description?: string;
  projectId: string;
  status: string;
  priority: string;
  assigneeId?: string;
  startDate?: string;
  dueDate?: string;
  createdAt: string;
  updatedAt: string;
  createdBy: string;
}

// 通知相关接口
export interface Notification {
  id: string;
  type: string;
  title: string;
  content: string;
  isRead: boolean;
  recipientId: string;
  createdAt: string;
  updatedAt: string;
  metadata?: Record<string, any>;
} 